<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>客户总数</title>
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
<meta name="format-detection" content="telephone=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<script src="__PUBLIC__/wap/js/flexible.js"></script>
<link href="__PUBLIC__/wap/css/icons.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/wap/css/base.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/wap/css/member.css" />
</head>
<body class="storelist">
<div class="head">
	<a href="javascript:history.go(-1);" class="md-close back"><i class="iconfont">&#xe617</i></a>
	<h2>客户总数</h2>
</div>
<div class="storetype clearfix">
	<!--({$count.fans1_vip})可以得到连锁店数量-->
	<!--({$count.fans2_vip})可以得到二级连锁店数量-->
		<a href="{:U('wap/member/fans')}" class="get_on_" >全部<i class="iconfont">&#xe634</i></a>
		<a href="{:U('wap/member/fans',array('type'=>1))}" class="get_on_1" >一级连锁店<i class="iconfont">&#xe634</i></a>
		<a href="{:U('wap/member/fans',array('type'=>2))}" class="get_on_2" >二级连锁店<i class="iconfont">&#xe634</i></a>
</div>

<div class=" list">
	<ul  class="more_html">
		<volist name="list" id='vo'>
		<li class="clearfix">
			<div class="avatar">
				<img src="{$vo.member_logo}">
			</div>
			<div class="info">
				<h6>{$vo.member_name}的店铺
					<span class="type store{$vo.vip_type}">
						{$vo.member_status}
					</span>
				</h6>
				<div class="tel num">
					<i class="hbFntWes">&#xf098</i> <a href="tel:{$vo.mobile}">{$vo.mobile}</a><span class="time"><i class="hbFntWes">&#xf017</i> {$vo.add_time}</span>
				</div>
			</div>
		</li>
		</volist>
	</ul>
</div>

<div class="loading">
	<div class=" get_more">
		<if condition="$fans_c gt 10 && count($list) eq 10">
			加载更多
			<else/>
			无更多数据
		</if>
	</div>
</div>

<div style="height:10px;">
</div>
<input type="hidden" name="p" value="2" />
<input type="hidden" name="type" value="{$_GET.type}" />

<include file="Public/footer_new" />

<script type="text/javascript" src="__PUBLIC__/wap/js/jquery.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/return-top.js"></script>

<script type="text/javascript">


	$(function(){
		$(".get_more").click(function(){
			get_more();
		});
		$(window).load(function () {
			get_more();
		});
		//class="on"点击获得焦点
	var is_on=$("input[name='type']").val();
	$('.get_on_'+is_on).addClass('on');

	});
	function get_more(){
		var p=$("input[name='p']").val();
		var type=$("input[name='type']").val();
		$.ajax({
			url: "{:U('wap/member/fans')}",
			type:'get',
			data: {p:p,type:type},
			dataType: 'json',
			success: function(data){
				//console.log(data);
				var con=1;
				if(data){
					var option='';
					$.each(data, function(i, value) {
						//this指向当前元素
						//i表示Array当前下标
						//value表示Array当前元素
						option=option+'<li class="clearfix">'
								+'<div class="avatar">'
								+'<img src="{$vo.member_logo}">'
								+'</div>'
								+'<div class="info">'
								+'<h6>'+value.member_name+'的店铺'
								+'<span class="type">'
								+value.member_status
								+'</span>'
								+'</h6>'
								+'<div class="tel num">'
								+'<i class="hbFntWes">&#xf098</i> <a href="tel:{$vo.mobile}">'+value.mobile+'</a><span class="time"><i class="hbFntWes">&#xf017</i> '+value.add_time+'</span>'
								+'</div>'
								+'</div>'
								+'</li>';
						con++;
					});
					$('.more_html').append(option);
					$("input[name='p']").val(parseInt(p)+1);
				}
				if(con<10){
					$('.get_more').html('无更多数据');
					$('.get_more').fadeOut(3000);
				}
			}
		});
	}
</script>
</body>
</html>